﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace Quanlytruongtruongtieuhoc
{
    public partial class frmXeplop : Form
    {
        public static string lophoc,xemlophoc,luuban;
        int kiemtraluuban = 0, bienluuban = 0;
        int kiemtra = 0,load=0;
        public frmXeplop()
        {
            InitializeComponent();
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {

        }
        private void taoCSDL(string ma, string nam, string makhoi)
        {
            try
            {
                string mact;
                if(makhoi=="1")
                    mact="1";
                else if(makhoi=="2"||makhoi=="3")
                    mact="2";
                else mact="3";
                SqlDataAdapter ap = new SqlDataAdapter("select a.ma_mon from mon_hoc a, mon_hoc_trong_chuong_trinh b where a.ma_mon=b.ma_mon and ma_ct='" + mact + "' and a.tinh_diem='True'", clsKetnoi.con);
                DataTable monhoctd = new DataTable();
                monhoctd.Clear();
                ap.Fill(monhoctd);
                for (int i = 0; i < monhoctd.Rows.Count; i++)
                {
                    DataRow row = monhoctd.Rows[i];
                    SqlCommand com1 = new SqlCommand("insert into kiem_tra_dinh_ky(nam_hoc,ma_hs,stt_hk,ma_mon) values('" + nam + "','" + ma + "','1','" + row[0].ToString() + "')", clsKetnoi.con);
                    SqlCommand com2= new SqlCommand("insert into kiem_tra_dinh_ky(nam_hoc,ma_hs,stt_hk,ma_mon) values('" + nam + "','" + ma + "','2','" + row[0].ToString() + "')", clsKetnoi.con);
                    com1.ExecuteNonQuery();
                    com2.ExecuteNonQuery();
                }
                SqlDataAdapter ap1 = new SqlDataAdapter("select a.ma_mon from mon_hoc a, mon_hoc_trong_chuong_trinh b where a.ma_mon=b.ma_mon and ma_ct='" + mact + "' and a.tinh_diem='False'", clsKetnoi.con);
                DataTable mon = new DataTable();
                mon.Clear();
                ap1.Fill(mon);
                for (int i = 0; i < mon.Rows.Count; i++)
                {
                    DataRow row = mon.Rows[i];
                    SqlCommand com1 = new SqlCommand("insert into kiem_tra_danh_gia(nam_hoc,ma_hs,stt_hk,ma_mon) values('" + nam + "','" + ma + "','1','" + row[0].ToString() + "')", clsKetnoi.con);
                    SqlCommand com2 = new SqlCommand("insert into kiem_tra_danh_gia(nam_hoc,ma_hs,stt_hk,ma_mon) values('" + nam + "','" + ma + "','2','" + row[0].ToString() + "')", clsKetnoi.con);
                    com1.ExecuteNonQuery();
                    com2.ExecuteNonQuery();
                }
                SqlCommand com = new SqlCommand("insert into diem_tong_hop(nam_hoc,ma_hs,stt_hk) values('" + nam + "','" + ma + "','1')", clsKetnoi.con);
                SqlCommand com11 = new SqlCommand("insert into diem_tong_hop(nam_hoc,ma_hs,stt_hk) values('" + nam + "','" + ma + "','2')", clsKetnoi.con);
                com.ExecuteNonQuery();
                com11.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void frmXeplop_Load(object sender, EventArgs e)
        {
            load = load + 1;
            btLuu.Enabled = false;
            btLuu1.Enabled = false;
            clsKetnoi.taoKetnoi();
            loadData(dtDanhsachhocsinh);
            if (load == 1)
            {
                this.dtDanhsachhocsinh.MouseMove += new MouseEventHandler(dtDanhsachhocsinh_MouseMove);
                this.dtLop.DragDrop += new DragEventHandler(dtLop_DragDrop);
                this.dtLop.DragEnter += new DragEventHandler(dtLop_DragEnter);
                this.dtDanhsachluuban.MouseMove += new MouseEventHandler(dtDanhsachluuban_MouseMove);
                this.dtXepluban.DragDrop += new DragEventHandler(dtXepluban_DragDrop);
                this.dtXepluban.DragEnter += new DragEventHandler(dtXepluban_DragEnter);
            }
            //Danh sach lop dua vao compobox
            SqlDataAdapter ap = new SqlDataAdapter("select * from lop_hoc where ma_khoi='1'", clsKetnoi.con);
            DataTable a = new DataTable();
            a.Clear();
            ap.Fill(a);
            cbLop.Items.Clear();
            for (int i = 0; i < a.Rows.Count; i++)
            {
                DataRow row=a.Rows[i];
                string lop = row[0].ToString() + "." + row[1].ToString();
                cbLop.Items.Add(lop);
            }
            loadData(dataGridView1);
            (dataGridView1.Columns[5] as DataGridViewComboBoxColumn).Items.Clear();
                for (int j = 0; j < a.Rows.Count; j++)
                {
                    DataRow row = a.Rows[j];
                    string lop = row[0].ToString() + "." + row[1].ToString();
                    (dataGridView1.Columns[5] as DataGridViewComboBoxColumn).Items.Add(lop);
                }
                for (int i = 0; i < dataGridView1.Rows.Count; i++)
                {
                DataGridViewRow r = dataGridView1.Rows[i];
                r.Height = 28;
                }
            //
            SqlDataAdapter ap1 = new SqlDataAdapter("select distinct ma_khoi,ma_lop from lop_hoc_sinh where nam_hoc=(select max(nam_hoc) from nam_hoc)", clsKetnoi.con);
            DataTable a1 = new DataTable();
            a1.Clear();
            ap1.Fill(a1);
            cbXemlop.Items.Clear();
            for (int i = 0; i < a1.Rows.Count; i++)
            {
                DataRow row1 = a1.Rows[i];
                string lop = row1[0].ToString() + "." + row1[1].ToString();
                cbXemlop.Items.Add(lop);
            }
            SqlDataAdapter ap11 = new SqlDataAdapter("select distinct ma_khoi,ma_lop from lop_hoc_sinh where nam_hoc=(select max(nam_hoc)-1 from nam_hoc) and luu_ban='True'", clsKetnoi.con);
            DataTable a11 = new DataTable();
            a11.Clear();
            ap11.Fill(a11);
            cbLopl.Items.Clear();
            for (int i = 0; i < a11.Rows.Count; i++)
            {
                DataRow row11 = a11.Rows[i];
                    string lop = row11[0].ToString() + "." + row11[1].ToString();
                    cbLopl.Items.Add(lop);
            }
        }

        void dtXepluban_DragEnter(object sender, DragEventArgs e)
        {
            if (e.Data.GetDataPresent(typeof(DataGridViewRow)))
            {
                e.Effect = DragDropEffects.Copy;
            }
        }

        void dtXepluban_DragDrop(object sender, DragEventArgs e)
        {
            int a = dtDanhsachluuban.CurrentRow.Index;
            DataGridViewRow row = e.Data.GetData(typeof(DataGridViewRow)) as DataGridViewRow;
            if (row != null)
            {
                if (cbLopluuban.Text == "")
                {
                    MessageBox.Show("Chưa chọn lớp.", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
                }
                else
                {
                    btLuu1.Enabled = true;
                    dtXepluban.Rows.Add();
                    dtXepluban.Rows[bienluuban].Cells[0].Value = bienluuban + 1;
                    dtXepluban.Rows[bienluuban].Cells[1].Value = dtDanhsachluuban.Rows[a].Cells[1].Value.ToString();
                    dtXepluban.Rows[bienluuban].Cells[2].Value = dtDanhsachluuban.Rows[a].Cells[2].Value.ToString();
                    dtXepluban.Rows[bienluuban].Cells[3].Value = cbLopluuban.Text;
                    kiemtraluuban = 1;
                    bienluuban++;
                }
            }
        }

        void dtDanhsachluuban_MouseMove(object sender, MouseEventArgs e)
        {
            try
            {
                if (e.Button == MouseButtons.Left)
                {
                    this.dtDanhsachluuban.DoDragDrop(this.dtDanhsachluuban.CurrentRow, DragDropEffects.All);
                    int a = dtDanhsachluuban.CurrentCell.RowIndex;
                    if (kiemtraluuban == 1)
                    {
                        dtDanhsachluuban.Rows.RemoveAt(a);
                        kiemtraluuban = 0;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Đã hết học sinh xếp lớp.", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
            }
        }

        void dtLop_DragEnter(object sender, DragEventArgs e)
        {
            if (e.Data.GetDataPresent(typeof(DataGridViewRow)))
            {
                e.Effect = DragDropEffects.Copy;
            }
        }
        int bien = 0;
        void dtLop_DragDrop(object sender, DragEventArgs e)
        {
           kiemtra = 0;
            int a = dtDanhsachhocsinh.CurrentRow.Index;
            DataGridViewRow row = e.Data.GetData(typeof(DataGridViewRow)) as DataGridViewRow;
            if (row != null)
            {
                if (cbLop.Text == "")
                {
                    MessageBox.Show("Chưa chọn lớp.", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
                }
                else
                {
                    btLuu.Enabled = true;
                    dtLop.Rows.Add();
                    dtLop.Rows[bien].Cells[0].Value = bien + 1;
                    dtLop.Rows[bien].Cells[1].Value = dtDanhsachhocsinh.Rows[a].Cells[1].Value.ToString();
                    dtLop.Rows[bien].Cells[2].Value = dtDanhsachhocsinh.Rows[a].Cells[2].Value.ToString();
                    dtLop.Rows[bien].Cells[3].Value = cbLop.Text;
                    kiemtra = 1;
                    bien++;
                }
            }
        }
        void dtDanhsachhocsinh_MouseMove(object sender, MouseEventArgs e)
        {
            try
            {
                if (e.Button == MouseButtons.Left)
                {
                    this.dtDanhsachhocsinh.DoDragDrop(this.dtDanhsachhocsinh.CurrentRow, DragDropEffects.All);
                    int a = dtDanhsachhocsinh.CurrentCell.RowIndex;
                    if (kiemtra == 1)
                    {
                      dtDanhsachhocsinh.Rows.RemoveAt(a);
                        kiemtra = 0;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Đã hết học sinh xếp lớp.", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
            }
        }
        private int namHoc()
        {
            SqlCommand com = new SqlCommand("select max(nam_hoc) from nam_hoc", clsKetnoi.con);
            int nam = Convert.ToInt32(com.ExecuteScalar());
            return nam;
        }
        private void loadData(DataGridView a)
        {
            try
            {
                SqlCommand com=new SqlCommand("select max(nam_hoc) from nam_hoc",clsKetnoi.con);
                string nam=com.ExecuteScalar().ToString().Substring(2,2);
                nam=nam+"%%%%";
                SqlDataAdapter ap = new SqlDataAdapter("select ma_hs,ho,ten,gioi_tinh,convert(char(10),nam_sinh,103) from hoc_sinh where xoa='False' and ma_hs like '" + nam + "' and ma_hs not in(select ma_hs from lop_hoc_sinh where nam_hoc=(select max(nam_hoc) from nam_hoc))", clsKetnoi.con);
                DataTable hs = new DataTable();
                hs.Clear();
                a.Rows.Clear();
                ap.Fill(hs);
                for (int i = 0; i < hs.Rows.Count; i++)
                {
                    DataRow row = hs.Rows[i];
                    a.Rows.Add();
                    a.Rows[i].Cells[0].Value = i + 1;
                    a.Rows[i].Cells[1].Value = row[0].ToString();
                    string ten = row[1].ToString() + " " + row[2].ToString();
                    a.Rows[i].Cells[2].Value = ten;
                    if (row[3].ToString() == "True")
                        a.Rows[i].Cells[3].Value = "Nam";
                    else a.Rows[i].Cells[3].Value = "Nữ";
                    a.Rows[i].Cells[4].Value = row[4].ToString();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private void tabPage1_Click(object sender, EventArgs e)
        {

        }

        private void btLuu_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult kq = new DialogResult();
                string mahs, nam_hoc, makhoi, malop;
                if (dtLop.Rows.Count > 0)
                {
                    kq = MessageBox.Show("Có chắc phân công không ?", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
                    if (DialogResult.OK == kq)
                    {
                        for (int i = 0; i < dtLop.Rows.Count; i++)
                        {
                            mahs = dtLop.Rows[i].Cells[1].Value.ToString();
                            nam_hoc = namHoc().ToString();
                            makhoi = dtLop.Rows[i].Cells[3].Value.ToString().Substring(0, 1);
                            malop = dtLop.Rows[i].Cells[3].Value.ToString().Substring(2, 1);
                            SqlCommand luu = new SqlCommand("insert into lop_hoc_sinh(nam_hoc,ma_hs,ma_khoi,ma_lop,luu_ban) values('" + nam_hoc + "','" + mahs + "','" + makhoi + "','" + malop + "','False')", clsKetnoi.con);
                            luu.ExecuteNonQuery();
                            taoCSDL(mahs, nam_hoc, makhoi);
                        }
                        MessageBox.Show("Đã lưu thành công. ", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                        dtLop.Rows.Clear();
                        frmXeplop_Load(sender, e);
                    }
                }
                else MessageBox.Show("Chưa xếp lớp cho học sinh.", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void frmXeplop_FormClosing(object sender, FormClosingEventArgs e)
        {
            Application.Exit();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            frmMain A = new frmMain();
            A.Show();
            this.Hide();
        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (cbLop.Text == "")
            {
                MessageBox.Show("Chưa chọn lớp.", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
                cbLop.Focus();
            }
            else
            {
                xem = 1;
                lophoc = cbLop.Text;
                frmXemdanhsachlop A = new frmXemdanhsachlop();
                A.ShowDialog();
            }
        }

        private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (cbXemlop.Text == "")
            {
                MessageBox.Show("Chưa chọn lớp.", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
                cbLop.Focus();
            }
            else
            {
                xem = 2;
                xemlophoc = cbXemlop.Text;
                frmXemdanhsachlop A = new frmXemdanhsachlop();
                A.ShowDialog();
            }
        }
       public static int xem = 0;
        private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (cbLopluuban.Text == "")
            {
                MessageBox.Show("Chưa chọn lớp.", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
                cbLop.Focus();
            }
            else
            {
                xem = 3;
                luuban=cbLopluuban.Text;
                frmXemdanhsachlop A = new frmXemdanhsachlop();
                A.ShowDialog();
                
            }
        }

        private bool hocsinhConhoc(string ma,string nam)
        {
            int tru=Convert.ToInt32(ma.Substring(2,2))-Convert.ToInt32(nam.Substring(0,2));
            if(tru>4)
                return false;
            else return true;
        }
        private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                string namhoc = namHoc().ToString();
                string mahs, makhoi, malop;
                try
                {
                    SqlDataAdapter ap = new SqlDataAdapter("select ma_hs,ma_khoi,ma_lop from lop_hoc_sinh where luu_ban='False' and nam_hoc=(select max(nam_hoc)-1 from nam_hoc)", clsKetnoi.con);
                    DataTable hs = new DataTable();
                    hs.Clear();
                    ap.Fill(hs);
                    for (int i = 0; i < hs.Rows.Count; i++)
                    {
                        DataRow row = hs.Rows[i];
                        if (hocsinhConhoc(namhoc, row[0].ToString()))
                        {
                            mahs = row[0].ToString();
                            makhoi = (Convert.ToInt32(row[1].ToString()) + 1).ToString();
                            malop = row[2].ToString();
                            SqlCommand com = new SqlCommand("insert into lop_hoc_sinh(nam_hoc,ma_hs,ma_khoi,ma_lop,luu_ban) values('" + namhoc + "','" + mahs + "','" + makhoi + "','" + malop + "','False')", clsKetnoi.con);
                            com.ExecuteNonQuery();
                            taoCSDL(mahs, namhoc, makhoi);
                        }
                        else continue;
                    }
                    MessageBox.Show("Đã lưu thành công. ", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Đã xếp lớp rồi. ", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void button4_Click(object sender, EventArgs e)
        {
            try
            {
                if (cbLopl.Text == "")
                {
                    MessageBox.Show("Không có mã lớp.", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                    cbLopl.Focus();
                }
                else
                {
                    dtDanhsachluuban.Rows.Clear();
                    SqlDataAdapter ap = new SqlDataAdapter("select a.ma_hs,a.ho,a.ten from hoc_sinh a, lop_hoc_sinh b where  a.ma_hs=b.ma_hs and b.luu_ban='True' and b.nam_hoc=(select max(nam_hoc)-1 from nam_hoc) and ma_khoi='" + cbLopl.Text.Substring(0, 1) + "' and ma_lop='" + cbLopl.Text.Substring(2, 1) + "' and a.ma_hs not in(select ma_hs from lop_hoc_sinh where nam_hoc=(select max(nam_hoc) from nam_hoc))", clsKetnoi.con);
                    DataTable hslb = new DataTable();
                    hslb.Clear();
                    ap.Fill(hslb);
                    for (int i = 0; i < hslb.Rows.Count; i++)
                    {
                        DataRow row = hslb.Rows[i];
                        dtDanhsachluuban.Rows.Add();
                        string ten = row[1].ToString() + " " + row[2].ToString();
                        dtDanhsachluuban.Rows[i].Cells[0].Value = i + 1;
                        dtDanhsachluuban.Rows[i].Cells[1].Value = row[0].ToString();
                        dtDanhsachluuban.Rows[i].Cells[2].Value = ten;
                    }
                    string khoi = cbLopl.Text.Substring(0, 1);
                    SqlDataAdapter ap1 = new SqlDataAdapter("select distinct ma_khoi,ma_lop from lop_hoc_sinh where ma_khoi='" + khoi + "' and nam_hoc=(select max(nam_hoc) from nam_hoc)", clsKetnoi.con);
                    DataTable hs = new DataTable();
                    ap1.Fill(hs);
                    cbLopluuban.Items.Clear();
                    for (int i = 0; i < hs.Rows.Count; i++)
                    {
                        DataRow row1 = hs.Rows[i];
                        string lop = (row1[0].ToString() + "." + row1[1].ToString());
                        cbLopluuban.Items.Add(lop);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult kq = new DialogResult();
                string mahs, nam_hoc, makhoi, malop;
                if (dtXepluban.Rows.Count > 0)
                {
                    kq = MessageBox.Show("Có chắc xếp lớp không ?", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
                    if (DialogResult.OK == kq)
                    {
                        for (int i = 0; i < dtXepluban.Rows.Count; i++)
                        {
                            mahs = dtXepluban.Rows[i].Cells[1].Value.ToString();
                            nam_hoc = namHoc().ToString();
                            makhoi = dtXepluban.Rows[i].Cells[3].Value.ToString().Substring(0, 1);
                            malop = dtXepluban.Rows[i].Cells[3].Value.ToString().Substring(2, 1);
                            SqlCommand luu = new SqlCommand("insert into lop_hoc_sinh(nam_hoc,ma_hs,ma_khoi,ma_lop,luu_ban) values('" + nam_hoc + "','" + mahs + "','" + makhoi + "','" + malop + "','False')", clsKetnoi.con);
                            luu.ExecuteNonQuery();
                            taoCSDL(mahs, nam_hoc, makhoi);
                        }
                        MessageBox.Show("Đã lưu thành công. ", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                        dtXepluban.Rows.Clear();
                        btLuu1.Enabled = false;
                        bienluuban = 0;
                        dtDanhsachluuban.Rows.Clear();
                        button4_Click(sender, e);
                    }
                    else
                    {
                        dtXepluban.Rows.Clear();
                        bienluuban = 0;
                        button4_Click(sender, e);
                    }
                }
                else MessageBox.Show("Chưa xếp lớp cho học sinh.", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void button2_Click_1(object sender, EventArgs e)
        {
            this.Hide();
            frmMain A = new frmMain();
            A.Show();
        }

        private void tabPage3_Click(object sender, EventArgs e)
        {
           
        }

        private void button3_Click_1(object sender, EventArgs e)
        {
            if (dataGridView1.Rows.Count > 0)
            {
                string mahs, makhoi, malop,namhoc;
                for (int i = 0; i < dataGridView1.Rows.Count; i++)
                {
                    DataGridViewRow row1 = dataGridView1.Rows[i];
                    try
                    {
                        string lophoc = (((DataGridViewComboBoxCell)row1.Cells[5]).Value.ToString());
                        mahs = dataGridView1.Rows[i].Cells[1].Value.ToString();
                        makhoi = lophoc.Substring(0, 1);
                        malop = lophoc.Substring(2, 1);
                        namhoc = namHoc().ToString();
                        SqlCommand luu = new SqlCommand("insert into lop_hoc_sinh(nam_hoc,ma_hs,ma_khoi,ma_lop,luu_ban) values('" + namhoc + "','" + mahs + "','" + makhoi + "','" + malop + "','False')", clsKetnoi.con);
                        luu.ExecuteNonQuery();
                        taoCSDL(mahs, namhoc, makhoi);
                        if( i == (dataGridView1.Rows.Count-1))
                        MessageBox.Show("Đã lưu thành công. ", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show("Chưa chọn mã lớp.", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                        break;
                    }

                }
                frmXeplop_Load(sender, e);
            }
            else MessageBox.Show("Đã hết học sinh xếp lớp.", "Thông tin", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
        }

        private void button5_Click(object sender, EventArgs e)
        {
            dtLop.Rows.Clear();
            loadData(dtDanhsachhocsinh);
            bien = 0;
        }

        private void button1_Click_1(object sender, EventArgs e)
        {
            this.Hide();
            frmMain A = new frmMain();
            A.Show();
        }

        private void button2_Click_2(object sender, EventArgs e)
        {
            frmXeplop_Load(sender, e);
        }
    }
}
